.farm-designer {
  position: relative;
  height: 100vh;
  overflow-y: hidden;
}

.farm-designer-map {
  display: inline-block;
  min-width: 100%;
  padding: 16rem 2rem 2rem 2rem; // at zoom = 1.0: 160px 20px 20px 20px
  height: 100%;
  overflow: auto;
  &.panel-open {
    padding: 11rem 2rem 2rem 31.8rem; // at zoom = 1.0: 110px 20px 20px 318px
  }
}

.drop-area {
  svg {
    width: 100%;
    height: 100%;
    overflow: visible;
    text {
      pointer-events: none;
    }
    text::selection {
      background: none;
    }
  }
}

.drop-area-svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}

.drop-area-background a {
  cursor: default !important;
}

.crop-drag-info-image {
  width: 100% !important;
  background-color: $translucent;
  max-width: 28rem;
}

.plant-catalog-image {
  width: 100%;
  background-position: center center !important;
  background-size: 158% !important;
  background-color: $translucent;
  height: 12rem;
}

.crop-search-result-wrapper {
  max-height: calc(100vh - 19rem);
  overflow-y: auto;
  overflow-x: hidden;
  margin-right: -10px;
  .plant-catalog-tile {
    position: relative;
    cursor: pointer;
    &:nth-child(4n),
    &:nth-child(4n-1) {
      margin-bottom: 2rem;
    }
    &:nth-child(4n-2),
    &:nth-child(4n-3) {
      margin-bottom: 2rem;
    }
    label {
      position: absolute;
      left: 15px;
      bottom: -5px;
      right: 15px;
      margin-top: 0 !important;
      padding: 0.4rem 0.6rem 0.2rem;
      background: rgba(0, 0, 0, 0.5);
      color: $white;
      font-size: 1.2rem !important;
    }
  }
}

.crop-info-overlay {
  display: flex;
  position: relative;
  bottom: 3rem;
  z-index: 2;
  background-color: $dark_gray;
  font-style: italic;
  color: $off_white;
  justify-content: center;
  /* align horizontal */
  align-items: center;
  /* align vertical */
  height: 3rem;
  width: 100%;
}

.thin-search-wrapper {
  .text-input-wrapper {
    position: relative;
    margin: 1rem;
    border-bottom: 1px solid #000;
    &:before,
    &:after {
      content: "";
      position: absolute;
      bottom: 0;
      background: #000;
      width: 1px;
      height: 10px;
    }
    &:before {
      left: 0;
    }
    &:after {
      right: 0;
    }
    .fa-search {
      position: absolute;
      top: 0.8rem;
      left: 1rem;
    }
  }
  input {
    background: transparent;
    box-shadow: none !important;
    padding-left: 3rem !important;
    font-size: 1.4rem !important;
    &:active,
    &:focus {
      background: transparent !important;
    }
    &::-webkit-input-placeholder {
      color: $placeholder_gray;
    }
  }
  .select-results-container {
    top: 4rem;
    margin-bottom: 12rem;
    max-height: none;
  }
  .select-result {
    padding: 0;
    margin-bottom: 1rem;
    background: transparent;
    border-bottom: none;
    transition: all 0.4s ease;
    &:last-child {
      margin-bottom: 14rem;
    }
    &:hover {
      background: rgba(0, 0, 0, 0.1);
      transition: all 0.2s ease;
    }
  }
  .plant-search-item {
    cursor: pointer;
    padding: 0.5rem 1rem;
    &:hover,
    &.hovered {
      background: darken($light_green, 10%);
      transition: background 0.2s ease;
    }
    img {
      margin: 0 1rem 0 0;
      height: 4rem;
      width: 4rem;
    }
  }
  .plant-search-item-age {
    text-align: right;
    font-size: 1rem;
    padding-top: 1.4rem;
    padding-right: 1rem;
    float: right;
  }
  .plant-search-item-name {
    display: inline-block;
    vertical-align: middle;
    white-space: nowrap;
    width: 8em;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-left: 1rem;
  }
}

.hovered-plant-copy {
  cursor: pointer;
  transform-origin: center;
  transform-box: fill-box;
}

.plant-link-wrapper {
  &.is-chosen-true.is-editing-true {
    cursor: -webkit-grab !important;
    &:active {
      cursor: -webkit-grabbing !important;
    }
  }
}

.plant-indicator.is-chosen-true {
  animation: plant-selection-pop 0.2s 1 cubic-bezier(0, 0, 0, 0.9), pulse-and-rotate 4s 0.2s infinite linear;
  transform-origin: center;
  transform-box: fill-box;
}

.plant-image {
  transform-origin: bottom;
  transform-box: fill-box;
  &.animate {
    animation: plant-growth 0.25s cubic-bezier(0, 0, 0, 1.4);
  }
}

.bug {
  z-index: 10;
  transform-origin: bottom;
  transform-box: fill-box;
  &.animate {
    animation: plant-growth 0.25s cubic-bezier(0, 0, 0, 1.4);
  }
  &.dead {
    z-index: 5;
    pointer-events: none;
  }
}

.soil-cloud {
  animation: soil-poof 0.5s cubic-bezier(0, 0, 0, 1);
  transform-origin: center;
  transform-box: fill-box;
}

.spread {
  transform-origin: center;
  transform-box: fill-box;
  pointer-events: none;
  &.animate {
    animation: spread-pop 0.2s cubic-bezier(0, 0, 0, 1);
  }
}

.virtual-bot-trail,
.virtual-peripherals {
  pointer-events: none;
}

.water-spray {
  &.animate {
    animation-duration: 3s;
    animation-iteration-count: infinite;
    animation-name: water-spray-animation;
    transform-origin: center;
    transform-box: fill-box;
    opacity: 0;
  }
}

.delay-1 {
  animation-delay: 1s;
}

.delay-2 {
  animation-delay: 2s;
}

@keyframes water-spray-animation {
  0% {
    transform: scale(0.7) rotate(0deg);
    opacity: 0;
  }
  50% {
    opacity: 1;
  }
  100% {
    transform: scale(1.1) rotate(10deg);
    opacity: 0;
  }
}

.vacuum {
  &.animate {
    animation-duration: 3s;
    animation-iteration-count: infinite;
    animation-name: vacuum-animation;
    transform-origin: center;
    transform-box: fill-box;
    opacity: 0;
  }
}

@keyframes vacuum-animation {
  0% {
    transform: scale(1);
    opacity: 0;
  }
  100% {
    transform: scale(0);
    opacity: 1;
  }
}

.saved-garden-indicator {
  position: fixed;
  top: 80px;
  left: 50%;
  z-index: 3;
  padding: 2rem;
  background: rgba(256, 256, 256, .75);
  border-radius: 5px;
  box-shadow: 0px 1px 4px #555;
  text-align: center;
  label {
    display: block;
  }
  button {
    margin: 0.5rem;
    float: unset;
  }
}

.saved-garden-list {
  margin: -15px;
  .saved-garden-row {
    padding: 0.25rem;
    button {
      margin-bottom: 1rem;
    }
    .saved-garden-info div {
      cursor: pointer;
      padding-right: 0;
    }
    &:hover {
      background: $light_gray;
    }
    &.selected {
      background: $gray;
      p {
        font-weight: bold;
      }
    }
  }
}

.garden-map-legend {
  position: fixed;
  top: 110px;
  right: -120px;
  z-index: 3;
  transition: all 0.4s ease;
  box-shadow: 0px 1px 4px #555;
  max-width: 120px;
  &.active {
    transform: translateX(-140px);
  }
  .content {
    display: flex;
    flex-direction: column;
    flex-wrap: wrap;
    background: rgba(256, 256, 256, .75);
    padding: 10px;
    border-radius: 5px;
    >*+* {
      margin-top: 1rem;
    }
    label {
      display: flex;
      flex-direction: column;
      align-items: center;
    }
    .plus-button {
      position: initial;
      margin: 0 auto;
    }
  }
  .toggle-buttons {
    display: flex;
    flex-direction: column;
    align-items: center;
    fieldset {
      width: 100%;
    }
    label {
      margin-bottom: 0;
    }
    button {
      float: none;
      margin-bottom: 0.5rem;
      margin-left: 2rem;
    }
  }
  .caret-menu-button {
    display: inline;
    margin-left: 0.25rem;
    font-weight: bold;
    font-size: medium;
    cursor: pointer;
  }
  .farmbot-origin {
    .quadrants {
      display: flex;
      flex-wrap: wrap;
      border: 1px solid $dark_gray;
    }
    .quadrant {
      display: inline-block;
      position: relative;
      background-image: linear-gradient(rgba(0, 0, 0, 0.05) 1px, transparent 1px), linear-gradient(90deg, rgba(0, 0, 0, 0.05) 1px, transparent 1px), linear-gradient(rgba(0, 0, 0, 0.05) 2px, transparent 2px), linear-gradient(90deg, rgba(0, 0, 0, 0.05) 2px, transparent 2px);
      background-size: 4px 4px, 4px 4px, 100px 100px, 100px 100px;
      cursor: pointer;
      border: 1px solid $dark_gray;
      width: 50%;
      height: 24px;
      transition: all 0.2s ease-in-out;
      &:hover {
        background-color: rgba(0, 0, 0, 0.1);
      }
      &.selected {
        box-shadow: inset 0 0 8px $dark_gray;
      } // Quadrant 1
      &:nth-child(2) {
        &:before {
          top: 0;
          right: 0;
        }
        &:after {
          top: 8px;
          right: 16px;
        }
      } // Quadrant 2
      &:nth-child(1) {
        &:before {
          top: 0;
          left: 0;
        }
        &:after {
          top: 8px;
          left: 16px;
        }
      } // Quadrant 3
      &:nth-child(3) {
        &:before {
          left: 0;
          bottom: 0;
        }
        &:after {
          left: 16px;
          bottom: 8px;
        }
      } // Quadrant 4
      &:nth-child(4) {
        &:before {
          bottom: 0;
          right: 0;
        }
        &:after {
          bottom: 8px;
          right: 16px;
        }
      }
      &:before {
        content: "";
        position: absolute;
        background: $black;
        width: 8px;
        height: 8px;
        border-radius: 50%;
      }
      &:after {
        content: "";
        position: absolute;
        background: $green;
        width: 8px;
        height: 8px;
        border-radius: 50%;
      }
    }
  }
  .more-bugs,
  .move-to-mode {
    button {
      margin-right: 1rem;
    }
    p {
      text-align: center;
      padding-top: 2rem;
    }
  }
  .menu-pullout {
    position: absolute;
    left: -4.5rem;
    color: $white;
    cursor: pointer;
    transition: all 0.4s ease;
    text-shadow: 0px 1px 1px #555;
    &.active {
      left: -4.5rem;
      transform: rotate(180deg);
      text-shadow: 1px 0px 0px #555;
      &:hover {
        left: -4.5rem;
        span {
          opacity: 0;
        }
      }
    }
    &:hover {
      left: -5rem;
      span {
        opacity: 1;
      }
    }
    span {
      position: absolute;
      top: 0.6rem;
      left: -4.6rem;
      transition-delay: 0.6s;
      transition: all 0.4s ease;
      opacity: 0;
    }
  }
}

.image-filter-menu {
  width: 32rem;
  th {
    text-align: center;
  }
  .pt-slider {
    margin-left: 3rem;
    margin-top: 1rem;
    width: 25rem;
  }
  .pt-slider-label {
    white-space: nowrap;
    text-align: center;
  }
  input {
    background: $white;
  }
}
